<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>超市订单管理系统</title>
    <link rel="stylesheet" type="text/css" href="/css/style.css">
    <!--[if lt IE 9]>
    <script src="/js/html5.js"></script>
    <![endif]-->
    <script src="/js/jquery.js"></script>
    <script src="/js/jquery.mCustomScrollbar.concat.min.js"></script>
</head>
<body>
<div th:replace="head::header"></div>
<div class="rt_content">

    <div class="page_title">
        <h2 class="fl">禁用用户列表</h2>
    </div>

    <form class="mtb" method="post" action="/user/findByAdd">
        <input name="userCode" type="text" class="textbox textbox_225" placeholder="输入用户编号"/>
        <input type="submit" value="查询" class="group_btn"/>
    </form>

    <table class="table">
        <tr>
            <th >用户编码</th>
            <th >用户名称</th>
            <th >用户状态</th>
            <th >性别</th>
            <th >生日</th>
            <th >电话</th>
            <th >住址</th>
            <th >用户角色</th>
            <th >操作</th>
        </tr>
        <tr th:each="user: ${users}">
            <td>
                <span th:text="${user.userCode}"></span>
            </td>
            <td>
                <span th:text="${user.userName}"></span>
            </td>
            <td>
                <span th:if="${user.type==1}">
                    <span th:text="已启动"></span>
                </span>
                <span th:if="${user.type==2}">
                    <span th:text="已禁用"></span>
                </span>
            </td>
            <td>
							<span th:if="${user.gender==1}">
								<span th:text="男"></span>
							</span>
                <span th:if="${user.gender==2}">
								<span th:text="女"></span>
							</span>
            </td>

            <td>
                <span th:text="${user.birthday}"></span>
            </td>
            <td>
                <span th:text="${user.phone}"></span>
            </td><td>
            <span th:text="${user.address}"></span>
        </td>
            <td>

                <span th:if="${user.userRole==1}">
								<span th:text="系统管理员"></span>
							</span>
                <span th:if="${user.userRole==2}">
								<span th:text="经理"></span>
							</span>
                <span th:if="${user.userRole==3}">
								<span th:text="普通员工"></span>
							</span>
            </td>
            <td class="center">

                <a th:href="@{/user/toMod(id=${user.id})}"  title="编辑" class="link_icon" data-toggle="modal"
                   data-target="#updateModal">&#101;</a>
                <a th:href="@{/user/changeType(id=${user.id},type=1)}"  onclick="return confirm('您确定要唤醒吗？');" title="唤醒" class="link_icon" data-toggle="modal"
                   data-target="#updateModal">&#110;</a>
                <a th:href="@{/user/del_user(id=${user.id})}" onclick="return confirm('您确定要删除吗？');" title="删除" class="link_icon">&#100;</a>
            </td>
        </tr>

    </table>


    <!-- 显示分页信息 -->
    <div class="row">
        <!--分页文字信息  -->
        <div class="col-md-6" id="page_info_area">
            当前<span th:text="${pageInfo.pageNum}"></span>页，
            总<span th:text="${pageInfo.pages}"></span>页，
            总<span th:text="${pageInfo.total}"></span>条记录
        </div>
        <!-- 分页条信息 -->
        <aside class="paging">

            <a th:href="@{/user/find_all_ban(pn=${pageInfo.getFirstPage()})}">首页</a>
            <a th:href="@{/user/find_all_ban(pn=${pageInfo.getPrePage()})}">&laquo;</a>
            <span th:each="p : ${pageInfo.navigatepageNums}"  >
                    <a th:text="${p}" th:href="@{/user/find_all_ban(pn=${p})}" > </a>
                </span>
            <a th:href="@{/user/find_all_ban(pn=${pageInfo.getLastPage()})}">末页</a>

        </aside>
    </div>

</div>
</section>
</body>
</html>